package com.center.biz.impl;

import com.center.api.model.EduComment;
import com.center.api.remote.RemoteEduCommentService;
import com.center.biz.dao.EduCommentMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduCommentService.class)
public class RemoteEduCommentServiceImpl implements RemoteEduCommentService{

    @Autowired
    private EduCommentMapper eduCommentMapper;
    @Override
    public int save(EduComment eduComment) {
        return this.eduCommentMapper.insertSelective(eduComment);
    }

    @Override
    public int update(EduComment eduComment) {
        return this.eduCommentMapper.updateByPrimaryKeySelective(eduComment);
    }

    @Override
    public int delete(int id) {
        return this.eduCommentMapper.deleteByPrimaryKey(id);
    }

    @Override
    public EduComment getById(int id) {
        return this.eduCommentMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduComment> select(EduComment eduComment) {
        return this.eduCommentMapper.select(eduComment);
    }
}
